package it.unina.lab.managers;

import org.apache.log4j.Logger;

import com.continuent.tungsten.commons.patterns.fsm.Entity;
import com.continuent.tungsten.commons.patterns.fsm.State;
import com.continuent.tungsten.commons.patterns.fsm.StateChangeListener;

public class StateChangeManager implements StateChangeListener {

	private Logger logger = Logger.getLogger(StateChangeManager.class);
	
	
	@Override
	public void stateChanged(Entity entity, State oldState, State newState) {
	        if(newState.isEnd())
	        	logger.info("Send message to IM: " + newState.getResult());
		
	}

}
